vhost:
  job-search.local:
    -
      name: job-search-static-default
      host_header: \.jsstatic\.com
      document_root: /var/www/html
      additional_config: |
        setenv.add-response-header += (
            "Access-Control-Allow-Origin" => "*",
            "Cache-Control" => "public, must-revalidate, proxy-revalidate"
        )

    -
      name: job-search-static-path-local
      host_header: job-search-local.jsstatic.com
      document_root: /var/www/html/job-search-static
    - 
      name: job-search-local-my
      host_header: www-local\.jobstreet\.com\.(my)
      document_root: /var/www/seekasia.com/JobSeekers/job-search/Data/www
      additional_config: |
        alias.url = ("/jobs/" => "/home/jobstmy/www/jobs/")
        index-file.names = ( "advanced.php", "index.php", )
        server.error-handler-404 = "/en/job-search/page-not-found.php"
        $HTTP["url"] =~ "\/id\/" {
            server.error-handler-404 = "/id/job-search/page-not-found.php"
        }
        $HTTP["url"] =~ "\/vi\/" {
            server.error-handler-404 = "/vi/job-search/page-not-found.php"
        }
        url.rewrite-repeat = (
            "^\/en\/job-search\/100k\/(.*)?$" => "/sg/100k/$1",
            "^\/en\/job-search\/(campus|low-application)\/(.*)?$" => "/%1/$1/%1/$2",
            "^\/([^\?]+)\/(low\-application)\/(my|sg|ph|id|vn)\/([^\?=\/]+-jobs\/[^\?=]*)(?:\?+(.*))?$" => "/$1/$2/$3/job-vacancy.php?seo=$4&$5",
            "^\/([^\?]+)\/(low\-application)\/(my|sg|ph|id|vn)\/(?:find-+([a-zA-Z-]+)+[?:\/]?[?:\?]?(.*)?)+$" => "/$1/$2/$3/browse-job.php?by=$4&$5",
            "^\/en\/job-search\/manager\/(.*)?$" => "/ph/manager/ph/$1",
            "^\/en\/job-search\/(mohe|mohe-intern)\/(.*)?$" => "/my/$1/$2",
            "^\/[en|id|vi]*\/job-search\/(SearchXML|home|misc|job)\/(.*)?$" => "/%1/$1/$2",
            "^\/en\/job-search\/(call-center-bpo|poea)\/(.*)?$" => "/ph/$1/$2",
            "^\/[en|id|vi]*\/job-search\/sitemap-([a-zA-Z-]+).xml(?:.*)?$" => "/%1/SiteMap/SitemapXml.php?by=$1&site=%1",
            "^\/(en|id|vi)\/job-search\/(.*)?$" => "/%1/$1/$2",
            "^\/([^\?]+)\/(company|search|p[0-9]+)\/([^\?=]*)((\?|&).*)?$" => "/$1/job-vacancy.php?seo=$2/$3",
            "^\/([^\?]+)\/(?:find\-(oversea|company)(?:s\-jobs)?)[\/]?[\?]?(.*)?$" => "/$1/browse-job.php?by=$2&$3",
            "^\/([^\?]+)\/find\-jobs-(?:on|as|in)-([a-zA-Z-]+)-(?:industry)(?:-by-)([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?seo=$2-jobs&by=$3&$4",
            "^\/([^\?]+)\/find\-jobs-(?:on|as|in)-([a-zA-Z-]+)(?:-by-)([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?by=$3&seo=$2-jobs&$4",
            "^\/([^\?]+)\/find\-jobs-(?:on|as|in)-([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?by=2nd&seo=$2-jobs&$3",
            "^\/([^\?]+)\/find\-([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?by=$2&$3",
            "^\/([^\?]+)\/(overseas\/[^\?=\/]+-jobs[^\?=]*)((\?|&).*)?$" => "/$1/job-vacancy.php?seo=$2$3",
            "^\/([^\?]+)\/(?:location|specialization|level|role|industry)\/([^\?=\/]+-jobs[\/]?[^\?=]*[\/]?)[\/?^]?(.*)?$" => "/$1/job-vacancy.php?seo=$2&$3",
            "^/([^\?]+)/([^\?=\/]+-jobs\/[^\?=]*)((\?|&).*)?$" => "/$1/job-vacancy.php?seo=$2",
        )

        # Temporary until MyJS dev environment migrate to SG2
        $HTTP["url"] =~ "^/(en|id|vi)/job/(.*)$" {
        server.tag = "dja-proxy"
            proxy.server  = (
                "/" => (
                    ( "host" => "10.10.20.39", "port" => 80)
                )
            )
        }

        $HTTP["url"] =~ "^/(css|js|img|fonts)/[A-Za-z0-9\.\-]+\.(css|js|ico|png|ttf|woff)$" {
            server.tag = "dja-proxy"
            proxy.server  = (
                "/" => (
                    ( "host" => "10.10.20.39", "port" => 80)
                )
            )
        }
        
    - 
      name: job-search-local-sg
      host_header: www-local\.jobstreet\.com\.(sg)
      document_root: /var/www/seekasia.com/JobSeekers/job-search/Data/www
      additional_config: |
        alias.url = ("/jobs/" => "/home/jobstmy/www/jobs/")
        index-file.names = ( "advanced.php", "index.php", )
        server.error-handler-404 = "/en/job-search/page-not-found.php"
        $HTTP["url"] =~ "\/id\/" {
            server.error-handler-404 = "/id/job-search/page-not-found.php"
        }
        $HTTP["url"] =~ "\/vi\/" {
            server.error-handler-404 = "/vi/job-search/page-not-found.php"
        }
        url.rewrite-repeat = (
            "^\/en\/job-search\/100k\/(.*)?$" => "/sg/100k/$1",
            "^\/en\/job-search\/(campus|low-application)\/(.*)?$" => "/%1/$1/%1/$2",
            "^\/([^\?]+)\/(low\-application)\/(my|sg|ph|id|vn)\/([^\?=\/]+-jobs\/[^\?=]*)(?:\?+(.*))?$" => "/$1/$2/$3/job-vacancy.php?seo=$4&$5",
            "^\/([^\?]+)\/(low\-application)\/(my|sg|ph|id|vn)\/(?:find-+([a-zA-Z-]+)+[?:\/]?[?:\?]?(.*)?)+$" => "/$1/$2/$3/browse-job.php?by=$4&$5",
            "^\/en\/job-search\/manager\/(.*)?$" => "/ph/manager/ph/$1",
            "^\/en\/job-search\/(mohe|mohe-intern)\/(.*)?$" => "/my/$1/$2",
            "^\/[en|id|vi]*\/job-search\/(SearchXML|home|misc|job)\/(.*)?$" => "/%1/$1/$2",
            "^\/en\/job-search\/(call-center-bpo|poea)\/(.*)?$" => "/ph/$1/$2",
            "^\/[en|id|vi]*\/job-search\/sitemap-([a-zA-Z-]+).xml(?:.*)?$" => "/%1/SiteMap/SitemapXml.php?by=$1&site=%1",
            "^\/(en|id|vi)\/job-search\/(.*)?$" => "/%1/$1/$2",
            "^\/([^\?]+)\/(company|search|p[0-9]+)\/([^\?=]*)((\?|&).*)?$" => "/$1/job-vacancy.php?seo=$2/$3",
            "^\/([^\?]+)\/(?:find\-(oversea|company)(?:s\-jobs)?)[\/]?[\?]?(.*)?$" => "/$1/browse-job.php?by=$2&$3",
            "^\/([^\?]+)\/find\-jobs-(?:on|as|in)-([a-zA-Z-]+)-(?:industry)(?:-by-)([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?seo=$2-jobs&by=$3&$4",
            "^\/([^\?]+)\/find\-jobs-(?:on|as|in)-([a-zA-Z-]+)(?:-by-)([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?by=$3&seo=$2-jobs&$4",
            "^\/([^\?]+)\/find\-jobs-(?:on|as|in)-([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?by=2nd&seo=$2-jobs&$3",
            "^\/([^\?]+)\/find\-([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?by=$2&$3",
            "^\/([^\?]+)\/(overseas\/[^\?=\/]+-jobs[^\?=]*)((\?|&).*)?$" => "/$1/job-vacancy.php?seo=$2$3",
            "^\/([^\?]+)\/(?:location|specialization|level|role|industry)\/([^\?=\/]+-jobs[\/]?[^\?=]*[\/]?)[\/?^]?(.*)?$" => "/$1/job-vacancy.php?seo=$2&$3",
            "^/([^\?]+)/([^\?=\/]+-jobs\/[^\?=]*)((\?|&).*)?$" => "/$1/job-vacancy.php?seo=$2",
        )

        # Temporary until MyJS dev environment migrate to SG2
        $HTTP["url"] =~ "^/(en|id|vi)/job/(.*)$" {
        server.tag = "dja-proxy"
            proxy.server  = (
                "/" => (
                    ( "host" => "10.10.20.39", "port" => 80)
                )
            )
        }

        $HTTP["url"] =~ "^/(css|js|img|fonts)/[A-Za-z0-9\.\-]+\.(css|js|ico|png|ttf|woff)$" {
            server.tag = "dja-proxy"
            proxy.server  = (
                "/" => (
                    ( "host" => "10.10.20.39", "port" => 80)
                )
            )
        }
        
    - 
      name: job-search-local-ph
      host_header: www-local\.jobstreet\.com\.(ph)
      document_root: /var/www/seekasia.com/JobSeekers/job-search/Data/www
      additional_config: |
        alias.url = ("/jobs/" => "/home/jobstmy/www/jobs/")
        index-file.names = ( "advanced.php", "index.php", )
        server.error-handler-404 = "/en/job-search/page-not-found.php"
        $HTTP["url"] =~ "\/id\/" {
            server.error-handler-404 = "/id/job-search/page-not-found.php"
        }
        $HTTP["url"] =~ "\/vi\/" {
            server.error-handler-404 = "/vi/job-search/page-not-found.php"
        }
        url.rewrite-repeat = (
            "^\/en\/job-search\/100k\/(.*)?$" => "/sg/100k/$1",
            "^\/en\/job-search\/(campus|low-application)\/(.*)?$" => "/%1/$1/%1/$2",
            "^\/([^\?]+)\/(low\-application)\/(my|sg|ph|id|vn)\/([^\?=\/]+-jobs\/[^\?=]*)(?:\?+(.*))?$" => "/$1/$2/$3/job-vacancy.php?seo=$4&$5",
            "^\/([^\?]+)\/(low\-application)\/(my|sg|ph|id|vn)\/(?:find-+([a-zA-Z-]+)+[?:\/]?[?:\?]?(.*)?)+$" => "/$1/$2/$3/browse-job.php?by=$4&$5",
            "^\/en\/job-search\/manager\/(.*)?$" => "/ph/manager/ph/$1",
            "^\/en\/job-search\/(mohe|mohe-intern)\/(.*)?$" => "/my/$1/$2",
            "^\/[en|id|vi]*\/job-search\/(SearchXML|home|misc|job)\/(.*)?$" => "/%1/$1/$2",
            "^\/en\/job-search\/(call-center-bpo|poea)\/(.*)?$" => "/ph/$1/$2",
            "^\/[en|id|vi]*\/job-search\/sitemap-([a-zA-Z-]+).xml(?:.*)?$" => "/%1/SiteMap/SitemapXml.php?by=$1&site=%1",
            "^\/(en|id|vi)\/job-search\/(.*)?$" => "/%1/$1/$2",
            "^\/([^\?]+)\/(company|search|p[0-9]+)\/([^\?=]*)((\?|&).*)?$" => "/$1/job-vacancy.php?seo=$2/$3",
            "^\/([^\?]+)\/(?:find\-(oversea|company)(?:s\-jobs)?)[\/]?[\?]?(.*)?$" => "/$1/browse-job.php?by=$2&$3",
            "^\/([^\?]+)\/find\-jobs-(?:on|as|in)-([a-zA-Z-]+)-(?:industry)(?:-by-)([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?seo=$2-jobs&by=$3&$4",
            "^\/([^\?]+)\/find\-jobs-(?:on|as|in)-([a-zA-Z-]+)(?:-by-)([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?by=$3&seo=$2-jobs&$4",
            "^\/([^\?]+)\/find\-jobs-(?:on|as|in)-([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?by=2nd&seo=$2-jobs&$3",
            "^\/([^\?]+)\/find\-([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?by=$2&$3",
            "^\/([^\?]+)\/(overseas\/[^\?=\/]+-jobs[^\?=]*)((\?|&).*)?$" => "/$1/job-vacancy.php?seo=$2$3",
            "^\/([^\?]+)\/(?:location|specialization|level|role|industry)\/([^\?=\/]+-jobs[\/]?[^\?=]*[\/]?)[\/?^]?(.*)?$" => "/$1/job-vacancy.php?seo=$2&$3",
            "^/([^\?]+)/([^\?=\/]+-jobs\/[^\?=]*)((\?|&).*)?$" => "/$1/job-vacancy.php?seo=$2",
        )

        # Temporary until MyJS dev environment migrate to SG2
        $HTTP["url"] =~ "^/(en|id|vi)/job/(.*)$" {
        server.tag = "dja-proxy"
            proxy.server  = (
                "/" => (
                    ( "host" => "10.10.20.39", "port" => 80)
                )
            )
        }

        $HTTP["url"] =~ "^/(css|js|img|fonts)/[A-Za-z0-9\.\-]+\.(css|js|ico|png|ttf|woff)$" {
            server.tag = "dja-proxy"
            proxy.server  = (
                "/" => (
                    ( "host" => "10.10.20.39", "port" => 80)
                )
            )
        }
        
    - 
      name: job-search-local-id
      host_header: www-local\.jobstreet\.co\.(id)
      document_root: /var/www/seekasia.com/JobSeekers/job-search/Data/www
      additional_config: |
        alias.url = ("/jobs/" => "/home/jobstmy/www/jobs/")
        index-file.names = ( "advanced.php", "index.php", )
        server.error-handler-404 = "/en/job-search/page-not-found.php"
        $HTTP["url"] =~ "\/id\/" {
            server.error-handler-404 = "/id/job-search/page-not-found.php"
        }
        $HTTP["url"] =~ "\/vi\/" {
            server.error-handler-404 = "/vi/job-search/page-not-found.php"
        }
        url.rewrite-repeat = (
            "^\/en\/job-search\/100k\/(.*)?$" => "/sg/100k/$1",
            "^\/en\/job-search\/(campus|low-application)\/(.*)?$" => "/%1/$1/%1/$2",
            "^\/([^\?]+)\/(low\-application)\/(my|sg|ph|id|vn)\/([^\?=\/]+-jobs\/[^\?=]*)(?:\?+(.*))?$" => "/$1/$2/$3/job-vacancy.php?seo=$4&$5",
            "^\/([^\?]+)\/(low\-application)\/(my|sg|ph|id|vn)\/(?:find-+([a-zA-Z-]+)+[?:\/]?[?:\?]?(.*)?)+$" => "/$1/$2/$3/browse-job.php?by=$4&$5",
            "^\/en\/job-search\/manager\/(.*)?$" => "/ph/manager/ph/$1",
            "^\/en\/job-search\/(mohe|mohe-intern)\/(.*)?$" => "/my/$1/$2",
            "^\/[en|id|vi]*\/job-search\/(SearchXML|home|misc|job)\/(.*)?$" => "/%1/$1/$2",
            "^\/en\/job-search\/(call-center-bpo|poea)\/(.*)?$" => "/ph/$1/$2",
            "^\/[en|id|vi]*\/job-search\/sitemap-([a-zA-Z-]+).xml(?:.*)?$" => "/%1/SiteMap/SitemapXml.php?by=$1&site=%1",
            "^\/(en|id|vi)\/job-search\/(.*)?$" => "/%1/$1/$2",
            "^\/([^\?]+)\/(company|search|p[0-9]+)\/([^\?=]*)((\?|&).*)?$" => "/$1/job-vacancy.php?seo=$2/$3",
            "^\/([^\?]+)\/(?:find\-(oversea|company)(?:s\-jobs)?)[\/]?[\?]?(.*)?$" => "/$1/browse-job.php?by=$2&$3",
            "^\/([^\?]+)\/find\-jobs-(?:on|as|in)-([a-zA-Z-]+)-(?:industry)(?:-by-)([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?seo=$2-jobs&by=$3&$4",
            "^\/([^\?]+)\/find\-jobs-(?:on|as|in)-([a-zA-Z-]+)(?:-by-)([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?by=$3&seo=$2-jobs&$4",
            "^\/([^\?]+)\/find\-jobs-(?:on|as|in)-([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?by=2nd&seo=$2-jobs&$3",
            "^\/([^\?]+)\/find\-([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?by=$2&$3",
            "^\/([^\?]+)\/(overseas\/[^\?=\/]+-jobs[^\?=]*)((\?|&).*)?$" => "/$1/job-vacancy.php?seo=$2$3",
            "^\/([^\?]+)\/(?:location|specialization|level|role|industry)\/([^\?=\/]+-jobs[\/]?[^\?=]*[\/]?)[\/?^]?(.*)?$" => "/$1/job-vacancy.php?seo=$2&$3",
            "^/([^\?]+)/([^\?=\/]+-jobs\/[^\?=]*)((\?|&).*)?$" => "/$1/job-vacancy.php?seo=$2",
        )

        # Temporary until MyJS dev environment migrate to SG2
        $HTTP["url"] =~ "^/(en|id|vi)/job/(.*)$" {
        server.tag = "dja-proxy"
            proxy.server  = (
                "/" => (
                    ( "host" => "10.10.20.39", "port" => 80)
                )
            )
        }

        $HTTP["url"] =~ "^/(css|js|img|fonts)/[A-Za-z0-9\.\-]+\.(css|js|ico|png|ttf|woff)$" {
            server.tag = "dja-proxy"
            proxy.server  = (
                "/" => (
                    ( "host" => "10.10.20.39", "port" => 80)
                )
            )
        }
        
    - 
      name: job-search-local-vn
      host_header: www-local\.jobstreet\.(vn)
      document_root: /var/www/seekasia.com/JobSeekers/job-search/Data/www
      additional_config: |
        alias.url = ("/jobs/" => "/home/jobstmy/www/jobs/")
        index-file.names = ( "advanced.php", "index.php", )
        server.error-handler-404 = "/en/job-search/page-not-found.php"
        $HTTP["url"] =~ "\/id\/" {
            server.error-handler-404 = "/id/job-search/page-not-found.php"
        }
        $HTTP["url"] =~ "\/vi\/" {
            server.error-handler-404 = "/vi/job-search/page-not-found.php"
        }
        url.rewrite-repeat = (
            "^\/en\/job-search\/100k\/(.*)?$" => "/sg/100k/$1",
            "^\/en\/job-search\/(campus|low-application)\/(.*)?$" => "/%1/$1/%1/$2",
            "^\/([^\?]+)\/(low\-application)\/(my|sg|ph|id|vn)\/([^\?=\/]+-jobs\/[^\?=]*)(?:\?+(.*))?$" => "/$1/$2/$3/job-vacancy.php?seo=$4&$5",
            "^\/([^\?]+)\/(low\-application)\/(my|sg|ph|id|vn)\/(?:find-+([a-zA-Z-]+)+[?:\/]?[?:\?]?(.*)?)+$" => "/$1/$2/$3/browse-job.php?by=$4&$5",
            "^\/en\/job-search\/manager\/(.*)?$" => "/ph/manager/ph/$1",
            "^\/en\/job-search\/(mohe|mohe-intern)\/(.*)?$" => "/my/$1/$2",
            "^\/[en|id|vi]*\/job-search\/(SearchXML|home|misc|job)\/(.*)?$" => "/%1/$1/$2",
            "^\/en\/job-search\/(call-center-bpo|poea)\/(.*)?$" => "/ph/$1/$2",
            "^\/[en|id|vi]*\/job-search\/sitemap-([a-zA-Z-]+).xml(?:.*)?$" => "/%1/SiteMap/SitemapXml.php?by=$1&site=%1",
            "^\/(en|id|vi)\/job-search\/(.*)?$" => "/%1/$1/$2",
            "^\/([^\?]+)\/(company|search|p[0-9]+)\/([^\?=]*)((\?|&).*)?$" => "/$1/job-vacancy.php?seo=$2/$3",
            "^\/([^\?]+)\/(?:find\-(oversea|company)(?:s\-jobs)?)[\/]?[\?]?(.*)?$" => "/$1/browse-job.php?by=$2&$3",
            "^\/([^\?]+)\/find\-jobs-(?:on|as|in)-([a-zA-Z-]+)-(?:industry)(?:-by-)([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?seo=$2-jobs&by=$3&$4",
            "^\/([^\?]+)\/find\-jobs-(?:on|as|in)-([a-zA-Z-]+)(?:-by-)([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?by=$3&seo=$2-jobs&$4",
            "^\/([^\?]+)\/find\-jobs-(?:on|as|in)-([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?by=2nd&seo=$2-jobs&$3",
            "^\/([^\?]+)\/find\-([a-zA-Z-]+)(?:[\/?]+)?(.*)?$" => "/$1/browse-job.php?by=$2&$3",
            "^\/([^\?]+)\/(overseas\/[^\?=\/]+-jobs[^\?=]*)((\?|&).*)?$" => "/$1/job-vacancy.php?seo=$2$3",
            "^\/([^\?]+)\/(?:location|specialization|level|role|industry)\/([^\?=\/]+-jobs[\/]?[^\?=]*[\/]?)[\/?^]?(.*)?$" => "/$1/job-vacancy.php?seo=$2&$3",
            "^/([^\?]+)/([^\?=\/]+-jobs\/[^\?=]*)((\?|&).*)?$" => "/$1/job-vacancy.php?seo=$2",
        )

        # Temporary until MyJS dev environment migrate to SG2
        $HTTP["url"] =~ "^/(en|id|vi)/job/(.*)$" {
        server.tag = "dja-proxy"
            proxy.server  = (
                "/" => (
                    ( "host" => "10.10.20.39", "port" => 80)
                )
            )
        }

        $HTTP["url"] =~ "^/(css|js|img|fonts)/[A-Za-z0-9\.\-]+\.(css|js|ico|png|ttf|woff)$" {
            server.tag = "dja-proxy"
            proxy.server  = (
                "/" => (
                    ( "host" => "10.10.20.39", "port" => 80)
                )
            )
        }